package com.utility.project.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.utility.project.entity.YsMemberConfig;
import com.utility.project.mapper.YsMemberConfigMapper;
import com.utility.project.service.IYsMemberConfigService;
import org.springframework.stereotype.Service;

/**
 * @author yangzhiguo
 * @date 2024-06-18
 * @description 会员价格配置
 */
@Service
public class YsMemberConfigServiceImpl extends ServiceImpl<YsMemberConfigMapper, YsMemberConfig> implements IYsMemberConfigService {

    @Override
    public YsMemberConfig queryConfig(String memberType) {
        QueryWrapper<YsMemberConfig> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("member_type", memberType);
        return baseMapper.selectOne(queryWrapper);
    }
}
